package com.ymx.darling.type;

import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class BigDecimalHandler implements TypeHandler<BigDecimal> {
    @Override
    public BigDecimal getResult(ResultSet resultSet, int columIndex) throws SQLException{
        return resultSet.getBigDecimal(columIndex);
    }

    @Override
    public void setParameter(PreparedStatement statement, BigDecimal value, int index) throws SQLException {
        statement.setBigDecimal(index,  value);
    }
}
